/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* 导航栏样式 */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background-color: #3498db;
}

/* 主内容区域 */
.container {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 2rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 博客文章样式 */
.blog-posts {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.post {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.post h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.post-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* 关于页面样式 */
.about-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 2rem;
}

.avatar {
    border-radius: 50%;
    flex-shrink: 0;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 1rem;
}

/* 联系表单样式 */
.contact-form {
    max-width: 600px;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.contact-form button {
    background: #3498db;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background: #2980b9;
}

/* 页脚样式 */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .container {
        margin-top: 120px;
        padding: 1rem;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .blog-posts {
        grid-template-columns: 1fr;
    }
}